package chapter3to7.src.main.java.com.kaikeba.concurrent;


import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;

/**
 * @author : wushikai
 * <p>
 * date : 2021-03-20
 */
public class MyCall implements Callable<Integer> {

    @Override
    public Integer call()  {

        System.out.println(  "线程 --> 启动");

        return  1;
    }

    public static void main(String[] args){

        Callable<Integer> call = new  MyCall();
        FutureTask<Integer> task = new FutureTask<>(call);
        Thread thread = new Thread(task);
        thread.start();


    }


}
